<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 100px;
            background-color: pink;

            animation: change 1s infinite alternate;
        }

        /* 动画一：宽度从200变化到800 */
        /* @keyframes change {
            from{
                width: 200px;
            }
            to{
                width: 800px;
            }
        } */

        /* 动画二：从200*400变化到300*300变化到800*500 */
        @keyframes change {
            0%{
                width: 200px;
                height: 400px;
            }
            50%{
                width: 300px;
                height: 300px;
            }
            100%{
                width: 800px;
                height: 500px;
            }
        }

    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>